package com.yfbao.horizon.pay.utils;

import lombok.Data;

import javax.validation.constraints.NotBlank;


/**
 * 扫描支付
 */
@Data
public class SecurePayDto {
    //支付系统中记录的用户id
    private String customerNo;

    //商户id(必填)
    @NotBlank(message = "商户号不能为空")
    private String merchantNo;

    //门店id（必填）
    @NotBlank(message = "门店号不能为空")
    private String storeNo;

    //交易金额（必填）
    @NotBlank(message = "交易金额不能为空")
//    @Pattern(regexp = "^\\d+(\\.\\d{1,2})?$", message = "金额格式不正确")
    private String amount;

    //当前币种（必填）
    @NotBlank(message = "币种不能为空")
    private String currency;

    //结算币种（必填）当currency = "GBP"时,settleCurrency="GBP",其他情况settleCurrency=“USD”
    @NotBlank(message = "结算币种不能为空")
    private String settleCurrency;

    //必填，支付方式
    @NotBlank(message = "支付方式不能为空")
////    @Pattern(regexp = "alipay|wechatpay|paypal|venmo|unionpay|creditcard|truemoney|alipay_hk|tng|gcash|dana|kakaopay|bkash|easypaisa|cashapppay",
//            message = "不支持的支付方式")
    private String vendor;

    //异步通知地址 必填
    @NotBlank(message = "异步通知地址不能为空")
    private String ipnUrl;

    //异步回调地址，必填
    @NotBlank(message = "回调地址不能为空")
    private String callbackUrl;

    //必填项，一般位商户订单系统中的交易流水号，唯一
    @NotBlank(message = "交易流水号不能为空")
    private String reference;

    //必填项，支付终端信息
    @NotBlank(message = "终端信息不能为空")
//    @Pattern(regexp = "ONLINE|WAP|YIP", message = "终端类型不正确")
    private String terminal;

    //交易描述
    private String description;

    //关于特定交易的额外内部注释
    private String note;

    //必填，默认位IOS；如果移动端时，显示终端类型IOS" and "ANDROID"
    @NotBlank(message = "操作系统类型不能为空")
//    @Pattern(regexp = "IOS|ANDROID", message = "操作系统类型不正确")
    private String osType;

    //交易超时时间，The timeout in minutes， The default value is 120
    private String timeout;

    //交易商品信息
    private String goodsInfo;

    //支付类型：The payment type. This is only required when vendor = creditcard.
    private String creditType;

    //必须，参数签名
    @NotBlank(message = "签名不能为空")
    private String verifySign;

    //The unique payment ID for payment methods stored in the PPMP vault.
    private String vaultId;
}